#!/bin/sh
# Usage: script/bootstrap
# Ensures all dependencies are installed locally.

set -e

cd "$(dirname "$0")/.."

if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
  brew update

  brew bundle check >/dev/null 2>&1  || {
    echo "==> Installing Homebrew dependencies…"
    brew bundle
  }
fi

# Update npm modules
echo "==> Installing/Updating NPM dependencies.."
npm prune
npm install
